<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app">{{calculateData()}}</div>
<script>
    const vueOpt = {
        data(){
            return {
                author:{
                    name: 'kenny.bai',
                    books: [
                        'book1',
                        'book2',
                        'book3'
                    ]
                }
            }
        },
        methods: {
            calculateData(){
                return this.author.books.length>0?'YES':'NO'
            }
        }
    }

    Vue.createApp(vueOpt).mount('#app');

</script>
</body>
</html>
